﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Undercover.Model;

namespace Undercover
{
    public partial class MainPage : PhoneApplicationPage
    {
        public MainPage()
        {
            InitializeComponent();
        }

        private void GoToNewGame(object sender, System.Windows.Input.GestureEventArgs e)
        {
            this.NavigationService.Navigate(new Uri(@"/Game/StartNewGamePage.xaml", UriKind.Relative));
        }

        private void GoToTreasure(object sender, System.Windows.Input.GestureEventArgs e)
        {
            //WordLibrary library = new WordLibrary();
            //library.Available.Add(new WordPair() { Word1 = "你好", Word2 = "不好", CanSwap = true });
            //library.Used.Add(new WordPair() { Word1 = "苹果", Word2 = "香蕉", CanSwap = false });

            //library.Save("test");
            //WordLibrary newlib = WordLibrary.Load("test");
//            this.NavigationService.Navigate(new Uri(@"/View/UserLibraryPage.xaml", UriKind.Relative));
            this.NavigationService.Navigate(new Uri(@"/Treasure/TreasurePage.xaml", UriKind.Relative));
        }
    }
}